// @ts-ignore
/* eslint-disable */
import { request } from '@umijs/max';

/** addTemplate POST /api/template/add */
export async function addTemplateUsingPOST(
  body: API.TemplateAddRequest,
  options?: { [key: string]: any },
) {
  return request<API.BaseResponseLong_>('/api/template/add', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** deleteTemplate POST /api/template/delete */
export async function deleteTemplateUsingPOST(
  body: API.DeleteRequest,
  options?: { [key: string]: any },
) {
  return request<API.BaseResponseBoolean_>('/api/template/delete', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** getTemplateById GET /api/template/get */
export async function getTemplateByIdUsingGET(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.getTemplateByIdUsingGETParams,
  options?: { [key: string]: any },
) {
  return request<API.BaseResponseTemplate_>('/api/template/get', {
    method: 'GET',
    params: {
      ...params,
    },
    ...(options || {}),
  });
}

/** getTemplateVOById GET /api/template/get/vo */
export async function getTemplateVOByIdUsingGET(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.getTemplateVOByIdUsingGETParams,
  options?: { [key: string]: any },
) {
  return request<API.BaseResponseTemplateVO_>('/api/template/get/vo', {
    method: 'GET',
    params: {
      ...params,
    },
    ...(options || {}),
  });
}

/** listTemplateByPage POST /api/template/list/page */
export async function listTemplateByPageUsingPOST(
  body: API.TemplateQueryRequest,
  options?: { [key: string]: any },
) {
  return request<API.BaseResponsePageTemplate_>('/api/template/list/page', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** listTemplateVOByPage POST /api/template/list/page/vo */
export async function listTemplateVOByPageUsingPOST(
  body: API.TemplateQueryRequest,
  options?: { [key: string]: any },
) {
  return request<API.BaseResponsePageTemplateVO_>('/api/template/list/page/vo', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** updateTemplate POST /api/template/update */
export async function updateTemplateUsingPOST(
  body: API.TemplateUpdateRequest,
  options?: { [key: string]: any },
) {
  return request<API.BaseResponseBoolean_>('/api/template/update', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}
